package com.ouryue.test.aspect;

import java.lang.reflect.Method;

import org.light.framework.mvc.annotation.Controller;
import org.light.framework.aop.AspectProxy;
import org.light.framework.aop.annotation.Aspect;

@Aspect(Controller.class)
public class ActionAspect extends AspectProxy {

  
    private long begin;

    @Override
    public void before(Class<?> cls, Method method, Object[] params)  {
        System.out.println("---------- begin ----------");
        begin = System.currentTimeMillis();
    }

    @Override
    public void after(Class<?> cls, Method method, Object[] params, Object result)  {
    	System.out.println("time: " + (System.currentTimeMillis() - begin) + "ms");
    	System.out.println("----------- end -----------");
    }
	
}
